#ifndef EMAILSUGGEST_H
#define EMAILSUGGEST_H
#include <QtGui>
#include <QObject>
#include <QLineEdit>
#include <QTreeWidget>
#include "Database.h"
#include "Settings.h"

class EmailSuggest : public QObject
{
    Q_OBJECT

public:
    EmailSuggest(QLineEdit *parent = 0);
    ~EmailSuggest();
    bool eventFilter(QObject *obj, QEvent *ev);

    void EmailContact(QStringList accountsList);

public slots:
    void DoneSuggest();
    void ShowSuggest(QLineEdit *editor, QString str);
private:
    QStringList suggest;
    QStringList accountsList;
    QLineEdit *edit;
    QStringList emailList;
    QTreeWidget *popup;
    Database db;
};

#endif // EMAILSUGGEST_H
